<template>
    <div>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        测试
        <hr />
        <form action="">
            <label for="">phone:</label> <input type="text" placeholder="phone" v-hvali="{key:'phone',rule:'required|phone'}"> <br>
            <hr />
            <label for="">email:</label> <input type="text" placeholder="email" v-hvali="{key:'email',rule:'email'}"> <br>
            <hr />
            <label for="">passWord:</label> <input type="text" placeholder="passWord" v-hvali="{key:'passWord',rule:'required|password'}"> <br>
            <hr />
            <button class="btn" type="button" @click="submit">提交</button>
            <br>
            <br>
        </form>
    </div>
</template>

<script>
export default {
    created() {
        try {
            BSL.GPS(function() {
                console.log("定位成功", this.arguments);
            });
        } catch (e) {
            console.log("定位失败");
        }
    },
    methods: {
        submit() {
            console.log("submit");
            try {
                BSL.StartGPS(function() {
                    console.log("定位成功StartGPS", this.arguments);
                }, 60000);
                BSL.GPS(function() {
                    console.log("定位成功", this.arguments);
                });
            } catch (e) {
                console.log("定位失败");
            }
            beforeSubmitValidate(() => {
                console.log("提交");
            });
        }
    }
};

</script>

<style>
.btn {
    width: 200px;
    height: 36px;
    line-height: 36px;
    background-color: #46aaff;
    color: white;
    letter-spacing: 1px;
    border: 1px solid #46aaff;
}
</style>
